/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ucm;

/**
 *
 * @author Donghui
 */
public class Convertor {

    private String value;
    private static Convertor local;

    public static Convertor getInstance()
    {
        if(local==null)
        {
            local=new Convertor();
        }
        return local;
    }

    public String bookGroup(int temp)
    {
        switch(temp)
        {
            case 15:
                value="Programming"; break;
            case 14:
                value="Novel";break;
            case 13:
                value="Medicine";break;
            case 12:
                value="Arts";break;
            case 11:
                value="Architecture";break;
            default:
                System.out.println("No case matched, check the input value!");break;
        }
        return value;
    }

    public String college(int temp)
    {
        switch(temp)
        {
            case 14:
                value="Mathematics";break;
            case 13:
                value="Foreign Language";break;
            case 12:
                value="Economy & Management";break;
            case 11:
                value="Computing & Technology";break;
            default:
                System.out.println("No case matched, check the input value!");break;
        }
        return value;
    }

    public String memberGroup(int temp)
    {
        switch(temp)
        {
            case 15:
                value="Vice-President";break;
            case 14:
                value="Senior";break;
            case 13:
                value="President";break;
            case 12:
                value="Junior";break;
            case 11:
                value="Director";break;
            default:
                System.out.println("No case matched, check the input value!");break;
        }
        return value;
    }

    public String rollGroup(int temp)
    {
        switch(temp)
        {
            case 13:
                value="Teacher";break;
            case 12:
                value="Student";break;
            case 11:
                value="Staff";break;
            default:
                System.out.println("No case matched, check the input value!");break;
        }
        return value;
    }

    public String staffGroup(int temp)
    {
        switch(temp)
        {
            case 13:
                value="Department of Finanical Affairs";break;
            case 12:
                value="Library";break;
            case 11:
                value="Educational Administration Center";break;
            default:
                System.out.println("No case matched, check the input value!");break;
        }
        return value;
    }

    public String studentGroup(int temp)
    {
        switch(temp)
        {
            case 13:
                value="Master";break;
            case 12:
                value="Doctor";break;
            case 11:
                value="Bachelor";break;
            default:
                System.out.println("No case matched, check the input value!");break;
        }
        return value;
    }

    public String teacherGroup(int temp)
    {
        switch(temp)
        {
            case 14:
                value="Professor";break;
            case 13:
                value="Lecturer";break;
            case 12:
                value="Associate Professor";break;
            case 11:
                value="Assistant";break;
            default:
                System.out.println("No case matched, check the input value!");break;
        }
        return value;
    }


}
